#ifndef __LINKQUEQUE_H_
#define __LINKQUEQUE_J_

#include "DoubleLinkvoid.h"

class LinkQueque
{
public:
    using ElementType = DoubleLinkList::ElementType;
    void Push(const ElementType &element)
    {
        list.InsertTail(element);
    }

    void Pop()
    {
        if (list.Size() == 0)
            return;
        list.RemoveByIndex(0);
    }

    ElementType *GetFront()
    {
        if (list.Size() == 0)
            return nullptr;
        return list.Head();
    }

    bool IsEmpty()
    {
        return list.Size() == 0;
    }

    int Size()
    {
        return list.Size();
    }

private:
    DoubleLinkList list;
};

#endif